Optimal. Leaf size=269 \[ \frac{3 a^3 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac{p+3}{2};\frac{p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac{a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac{p+1}{2};\frac{p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac{a^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+4}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)}+\frac{3 a^3 \sin (e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+2}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.345108, antiderivative size = 269, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2710, 3476, 364, 2602, 2577, 2591} \[ \frac{3 a^3 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac{p+3}{2};\frac{p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac{a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac{p+1}{2};\frac{p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac{a^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+4}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)}+\frac{3 a^3 \sin (e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+2}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2710
Rule 3476
Rule 364
Rule 2602
Rule 2577
Rule 2591
Rubi steps
\begin{align*} \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx &=\int \left (a^3 (g \tan (e+f x))^p+3 a^3 \sin (e+f x) (g \tan (e+f x))^p+3 a^3 \sin ^2(e+f x) (g \tan (e+f x))^p+a^3 \sin ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx\\ &=a^3 \int (g \tan (e+f x))^p \, dx+a^3 \int \sin ^3(e+f x) (g \tan (e+f x))^p \, dx+\left (3 a^3\right ) \int \sin (e+f x) (g \tan (e+f x))^p \, dx+\left (3 a^3\right ) \int \sin ^2(e+f x) (g \tan (e+f x))^p \, dx\\ &=\frac{\left (a^3 g\right ) \operatorname{Subst}\left (\int \frac{x^p}{g^2+x^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac{\left (3 a^3 g\right ) \operatorname{Subst}\left (\int \frac{x^{2+p}}{\left (g^2+x^2\right )^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac{\left (a^3 \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{3+p}(e+f x) \, dx}{g}+\frac{\left (3 a^3 \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{1+p}(e+f x) \, dx}{g}\\ &=\frac{a^3 \, _2F_1\left (1,\frac{1+p}{2};\frac{3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac{3 a^3 \cos ^2(e+f x)^{\frac{1+p}{2}} \, _2F_1\left (\frac{1+p}{2},\frac{2+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}+\frac{a^3 \cos ^2(e+f x)^{\frac{1+p}{2}} \, _2F_1\left (\frac{1+p}{2},\frac{4+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sin ^3(e+f x) (g \tan (e+f x))^{1+p}}{f g (4+p)}+\frac{3 a^3 \, _2F_1\left (2,\frac{3+p}{2};\frac{5+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{3+p}}{f g^3 (3+p)}\\ \end{align*}
Mathematica [C] time = 58.8952, size = 5199, normalized size = 19.33 \[ \text{Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 1.709, size = 0, normalized size = 0. \begin{align*} \int \left ( a+a\sin \left ( fx+e \right ) \right ) ^{3} \left ( g\tan \left ( fx+e \right ) \right ) ^{p}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-{\left (3 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} +{\left (a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3}\right )} \sin \left (f x + e\right )\right )} \left (g \tan \left (f x + e\right )\right )^{p}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]